package com.mcmaster.android;

import java.util.ArrayList;
import android.content.Context;
import android.graphics.drawable.Drawable;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class MarkLocation extends ItemizedOverlay<OverlayItem>{

	private ArrayList<OverlayItem> marker = new ArrayList<OverlayItem>();
	private Context c;
	
	public MarkLocation(Drawable pin) {
		super(boundCenter(pin));
	}
	
	public MarkLocation(Drawable m, Context cxt) {
		this(m);
		c = cxt;
	}
	
	@Override
	protected OverlayItem createItem(int i) {
		return marker.get(i);
	}

	@Override
	public int size() {
		return marker.size();
	}

	public void insertMarker(OverlayItem item){
		 marker.add(item);
		 this.populate();
	}
}